/****************************************************************************************************** * SPIME START ******************************************************************************************************/ var LightBox = {}; /****************************************************************************************************** * MAIN * called from body onLoad func ******************************************************************************************************/ LightBox.initLinks = function(holder){ //Only in viewer mode if(typeof window["EditorHelper"] == "undefined"){ var links; if (holder){ links = holder.find("a[data-link-type='LIGHTBOX']"); }else{ links = $("a[data-link-type='LIGHTBOX']"); } links.each(function(){ var currentLink = $(this); currentLink.removeAttr("href"); currentLink.removeAttr("target"); currentLink.addClass("clickable"); //blocking media widgets to show lightbox if (currentLink.closest(".item-box").find("[data-menu-name='PREVIEW_RAW']").length > 0 && currentLink.is(".image-link")){ currentLink.remove(); } currentLink.unbind("click").bind("click",function(e){ e.stopPropagation(); //blocking media widgets to show lightbox if (currentLink.closest(".item-box").find("[data-menu-name='PREVIEW_RAW']").length > 0){ e.preventDefault(); return false; } LightBox.itemClick($(this).closest(".item-content")); return false; }); }); var registerLinks ; if (holder){ registerLinks = holder.find("a[href^='register://'] , a[href^='registers://']"); }else{ registerLinks = $("a[href^='register://'], a[href^='registers://']"); } if (registerLinks.length > 0){ if (typeof XPRSTranslator == "undefined"){ $("